home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d1 / ced10da.arc / CED.DOC < prev    next >
Text File  |  1988-11-13  |  70KB  |  1,710 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.                              ==========================
  27.                               CED - DOS Command Editor
  28.                                     User's Guide
  29.                                     Version 1.0D
  30.                              ==========================
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.                                  Copyright (c) 1985
  38.                                Christopher J. Dunford
  39.                               10057-2 Windstream Drive
  40.                               Columbia, Maryland 21044
  41.                                    (301) 992-9371
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.                                     Contents
  49.  
  50.                Purpose . . . . . . . . . . . . . . . . . . . .   1
  51.                System Requirements . . . . . . . . . . . . . .   1
  52.                Terminology . . . . . . . . . . . . . . . . . .   1
  53.                Installation  . . . . . . . . . . . . . . . . .   2
  54.                Command line editor . . . . . . . . . . . . . .   2
  55.                     Typeover and insert modes  . . . . . . . .   3
  56.                     Cursor movement keys . . . . . . . . . . .   3
  57.                     Text deletion keys . . . . . . . . . . . .   4
  58.                     Copying from template (Edlin)  . . . . . .   4
  59.                DOS command stack . . . . . . . . . . . . . . .   5
  60.                Application program command stack . . . . . . .   7
  61.                Pcall function  . . . . . . . . . . . . . . . .   7
  62.                Synonyms  . . . . . . . . . . . . . . . . . . .   8
  63.                Command chaining  . . . . . . . . . . . . . . .   9
  64.                Command parameters  . . . . . . . . . . . . . .  11
  65.                Ignoring commands . . . . . . . . . . . . . . .  13
  66.                Ignoring individual commands  . . . . . . . . .  13
  67.                Clearing CED objects  . . . . . . . . . . . . .  14
  68.                Configuration files . . . . . . . . . . . . . .  15
  69.                Changing default buffer sizes . . . . . . . . .  16
  70.                Status display  . . . . . . . . . . . . . . . .  17
  71.                Multiple definitions  . . . . . . . . . . . . .  17
  72.                User-installed commands . . . . . . . . . . . .  18
  73.                     Subfunction 0: Enqueue . . . . . . . . . .  18
  74.                     Subfunction 1: Dequeue . . . . . . . . . .  19
  75.                     Return registers . . . . . . . . . . . . .  19
  76.                     Command processor  . . . . . . . . . . . .  20
  77.                Problem determination . . . . . . . . . . . . .  21
  78.                Appendix A: Command summary . . . . . . . . . .  24
  79.                Appendix B: Order of Processing . . . . . . . .  26
  80.                Appendix C: Limitations . . . . . . . . . . . .  27
  81.                Appendix D: Versions  . . . . . . . . . . . . .  28
  82.                Appendix E: User Command Demo . . . . . . . . .  29
  83.                Copyright and Disclaimer  . . . . . . . . . . .  31
  84.  
  85.  
  86.  
  87.  
  88.           Purpose
  89.           -------
  90.  
  91.           CED (which stands for Command EDitor) provides the following
  92.           functions at the DOS prompt, or from within certain applications
  93.           programs:
  94.  
  95.                -- Improved command line editing facility.
  96.  
  97.                -- Recall of previously issued commands for re-entry.
  98.  
  99.                -- Command synonyms, which may include "chaining" of a
  100.                series of commands.
  101.  
  102.                -- Parameterization of synonym commands.
  103.  
  104.                -- Recall of parameters for previously issued commands.
  105.  
  106.                -- User-settable buffer sizes for all functions.
  107.  
  108.                -- For programmers, a facility to add new "resident"
  109.                commands to the DOS shell.
  110.  
  111.  
  112.           System Requirements
  113.           -------------------
  114.  
  115.           CED was written for the IBM PC/XT/AT and true compatibles. 
  116.  
  117.           CED requires DOS Version 2.00 or later.  It increases the size of
  118.           resident DOS by about 16K bytes when installed.  Most of this
  119.           space is, however, used for data storage, and the amount of
  120.           storage can be reduced.  Thus, smaller versions of CED are
  121.           possible.
  122.  
  123.  
  124.           Terminology
  125.           -----------
  126.  
  127.           This document will usually refer to "commands" or "DOS commands"
  128.           as CED targets; you should take this to mean either (a) actual
  129.           DOS commands, or (b) input to CED-compatible programs (for
  130.           example, DEBUG commands).
  131.  
  132.           Key names are as follows:
  133.  
  134.           <Up>           The up-arrow key on the numeric keypad.
  135.           <Down>         The down-arrow key on the numeric keypad.
  136.           <Left>         The left-arrow key on the numeric keypad.
  137.           <Right>        The right-arrow key on the numeric keypad.
  138.           <Backspace>    The large left-arrow key, next to NumLock.
  139.  
  140.           A caret (^) means to press the Ctrl key in conjunction with a
  141.  
  142.  
  143.  
  144.           named key; for example, <^End> means "press and hold the Ctrl
  145.           key, then press <End>".
  146.  
  147.           Words in CAPS are CED keywords and must be typed exactly as shown
  148.           (they need not be capitalized when you use them).
  149.  
  150.           Words in [brackets] are optional elements of a command.
  151.  
  152.  
  153.           Installation
  154.           ------------
  155.  
  156.           Installation (in its simplest form) is accomplished by typing
  157.           "CED" at the DOS prompt, or including the statement "CED" in your
  158.           AUTOEXEC.BAT file.  There are optional parameters when installing
  159.           CED; these will be covered later.
  160.  
  161.           After CED is installed, everything will appear to be normal, but
  162.           you now have many new features when entering DOS commands.  The
  163.           remainder of this document will describe these features.
  164.  
  165.           CED is active either at the DOS prompt, or when an application
  166.           program requests buffered keyboard input from DOS (DOS function
  167.           0AH).  There are a few such programs (DEBUG and EDLIN are two);
  168.           but the main use of CED is at the DOS prompt.  
  169.  
  170.           Once CED has been installed, the command "CED" becomes an
  171.           internal DOS command.  Thus, when you want to issue CED commands
  172.           (as explained below), you will type "CED <command>", but the
  173.           program file (CED.COM) need NOT be available on disk.  CED
  174.           becomes fully memory resident and is an extension to DOS after
  175.           installation.  In particular, this means that you should NOT
  176.           include a drive or path in issuing CED commands after initial
  177.           installation.  A command like "C:CED SYN d dir" will reload CED,
  178.           which is probably not what you intend.
  179.  
  180.  
  181.           Command line editor
  182.           -------------------
  183.  
  184.           CED provides a new "editor" for DOS commands.  You will use this
  185.           editor whenever you type a DOS command, or when you enter data to
  186.           a compatible program such as DEBUG.  CED's editor replaces all of
  187.           the DOS editing keys, including F1-F5.
  188.  
  189.           There are two big differences between the CED editor and the DOS
  190.           editor.  First, the CED editor always allows you to see all of
  191.           your data; where the DOS editor likes to "hide" characters, the
  192.           CED editor always displays all of the characters that it is
  193.           using.  Second, the CED editor allows you to move the cursor
  194.           around within a command, which makes correcting and altering
  195.           commands much easier.  The keystrokes that CED uses for editing
  196.           are very similar to those used by many word processors and text
  197.  
  198.  
  199.  
  200.           editors; you will find command entry and editing to be much more
  201.           natural than with the DOS editor. 
  202.  
  203.  
  204.           TYPEOVER AND INSERT MODES
  205.  
  206.           The CED editor had two basic modes: the typeover mode and the
  207.           insert mode.  In typeover (the normal mode), anything you type
  208.           will add to or replace the text currently displayed.  In insert
  209.           mode, anything you type will be inserted into the text at the
  210.           current cursor position, moving any characters to the right of
  211.           the cursor out of the way.  The <Ins> key toggles between
  212.           typeover and insert modes.  
  213.  
  214.           To demonstrate this, type some text at the DOS prompt, then use
  215.           the left-arrow key to move the cursor into the text you just
  216.           entered (note that the text is not erased; the arrow key simply
  217.           moves the cursor).  Now type a few characters and observe
  218.           that they replace the text already there; this is typeover.  Now
  219.           press the <Ins> key once to enter insert mode (note that the
  220.           cursor changes size to let you know that you're in insert mode),
  221.           and type some more text.  Note that the new text is inserted into
  222.           your "command", and the remaining text is moved right, out of the
  223.           way.  Press <Esc> to erase the command completely.
  224.            
  225.  
  226.           CURSOR MOVEMENT KEYS
  227.  
  228.           CED uses the following keys to move the cursor around within the
  229.           command you are typing:
  230.  
  231.           <Home>              Moves the cursor to the "home" position, that
  232.                               is, to the first character.
  233.  
  234.           <End>               Moves the cursor to the end position (follow-
  235.                               ing the last character displayed).
  236.  
  237.           <Left>              Moves the cursor left one character.  This
  238.                               does not erase any characters; it simply
  239.                               moves the cursor.  Remember that <Left> is
  240.                               the left-arrow key on the numeric keypad (key
  241.                               4), not the backspace key (the larger left
  242.                               arrow next to NumLock).
  243.  
  244.           <Right>             Moves the cursor right one character.
  245.  
  246.           <^Left>             Moves the cursor left one word.  A "word" is
  247.                               any sequence of characters bounded by one or
  248.                               more spaces; the cursor will be placed on
  249.                               the first character of the previous "word".
  250.  
  251.           <^Right>            Moves the cursor right one word; it will be
  252.                               placed on the first character of the next
  253.                               word.
  254.  
  255.  
  256.  
  257.  
  258.  
  259.           TEXT DELETION KEYS
  260.  
  261.           You can use the following CED editor keys to delete text:
  262.  
  263.           <Del>               Deletes the character at the cursor position.
  264.  
  265.           <Backspace>         Deletes the character to the left of the
  266.                               cursor position, and moves the cursor left. 
  267.                               This is known as a destructive backspace; it
  268.                               is exactly equivalent to keying <Left>
  269.                               followed by <Del>.
  270.  
  271.           <^End>              Deletes all characters from the cursor
  272.                               position to end of the command.
  273.  
  274.           <^Home>             Deletes all characters from the home position
  275.                               (first character) to the cursor position, not
  276.                               including the character at the cursor
  277.                               position.
  278.            
  279.           <Esc>               Cancel: erases the command completely and
  280.                               allows you to start over.
  281.  
  282.  
  283.           COPYING FROM TEMPLATE (EDLIN)
  284.  
  285.           When DOS or user programs such as EDLIN request input from CED,
  286.           they provide it with an input "template".  In almost all cases,
  287.           this template is a copy of the last command entered.  The
  288.           template is the data that is used by the DOS editing keys
  289.           (<F1>-<F5>, etc.).
  290.  
  291.           CED users will not need this template very often, because the
  292.           command stack (described below) provides a similar but much more
  293.           powerful function.  There are a few cases, however, when the
  294.           template will be useful; the most important of these is seen in
  295.           the DOS line editor, EDLIN.  If you do not use EDLIN, this topic
  296.           will probably not be of interest to you.
  297.  
  298.           When you are editing a previously entered line (by typing the
  299.           line number at the EDLIN prompt), EDLIN places a copy of the line
  300.           to be edited into the template.  In order to allow you to edit
  301.           the template directly, CED uses <F3> to copy the contents of the
  302.           template to the screen for editing.  This is very similar in
  303.           effect to <F3> as used by DOS.  So, when you want to edit an
  304.           Edlin text line, type the line number, followed by <F3>.  This is
  305.           an example EDLIN session:
  306.  
  307.  
  308.  
  309.  
  310.                C> edlin test 
  311.                End of input file 
  312.                *1,3L 
  313.                     1:*This is line 1 
  314.                     2: This is line 2 
  315.                     3: This is line 3 
  316.                *2 
  317.                     2:*This is line 2 
  318.                     2:*_
  319.  
  320.           At this point, the text "This is line 2" is in the template, but
  321.           it is not displayed.  To display the text and allow it to be
  322.           edited, just press <F3>, and the screen will appear as follows:
  323.  
  324.                C> edlin test 
  325.                End of input file 
  326.                *1,3L 
  327.                     1:*This is line 1 
  328.                     2: This is line 2 
  329.                     3: This is line 3 
  330.                *2 
  331.                     2:*This is line 2 
  332.                     2:*This is line 2_
  333.  
  334.           As you can see, <F3> performs approximately as it would under the
  335.           DOS command editor.
  336.            
  337.           <F3> is available any time CED is active, but, in most cases, it
  338.           will simply redisplay the last command entered.
  339.  
  340.  
  341.           DOS command stack
  342.           -----------------
  343.  
  344.           CED keeps a record of each command you enter.  You can retrieve
  345.           and re-enter these commands by using the <Up> and <Down> keys to
  346.           display the old commands, then pressing <Enter> when the desired
  347.           command is displayed (the command can be edited, of course).
  348.  
  349.           You can visualize the stored data as a "stack" of commands. 
  350.           CED keeps a pointer to somewhere in this stack.  The pointer
  351.           always points to a location "between" two commands; when you
  352.           press <Up>, CED displays the command "above" the pointer, then
  353.           moves the pointer up one command.  When you press <Down>, CED
  354.           displays the command "below" the pointer, then moves the pointer
  355.           down one command.
  356.  
  357.           For example, suppose you have entered commands A, B, and C. The
  358.           stack will appear as follows:
  359.  
  360.  
  361.  
  362.  
  363.                               +-------------+
  364.                               |      A      |
  365.                               +-------------+
  366.                               |      B      |
  367.                               +-------------+
  368.                               |      C      |
  369.                               +-------------+  <-- pointer
  370.  
  371.           The stack is circular in nature; thus, if the pointer points
  372.           "below" the last command in the stack (as it does above), it is
  373.           actually between the last command (C) and the first command
  374.           (A).  In the situation above, pressing <Up> will display command
  375.           C and leave the pointer between B and C.  Pressing <Down> will
  376.           display command A, and leave the pointer between A and B.
  377.  
  378.           When you recall an old command and re-enter it without editing,
  379.           the re-entered command is not added to the stack, and the pointer
  380.           will drop one level.  Suppose, for example, that you press <Up>
  381.           twice from the position above (pointer below C): B is displayed,
  382.           and the stack looks like this:
  383.  
  384.  
  385.                               +-------------+
  386.                               |      A      |
  387.                               +-------------+ <-- pointer
  388.                               |      B      |
  389.                               +-------------+
  390.                               |      C      |
  391.                               +-------------+
  392.  
  393.           If you now press <Enter> (without editing the command), command B
  394.           will be sent to DOS, and the pointer will drop to point between B
  395.           and C.  From there, <Up> will display B again, and <Down> will
  396.           display C.  Thus you can "recycle" a series of commands by
  397.           pressing <Up> until you see the first command, <Enter> to execute
  398.           it, then a series of <Down><Enter> sequences to re-execute the
  399.           commands in the original order.
  400.  
  401.           If you retrieve an old command and edit it before execution, the
  402.           newly edited command is added to the bottom of the stack, and the
  403.           pointer will point just below it.
  404.  
  405.           CED will not stack any commands of two characters or less (the
  406.           theory being that it's easier to retype than to go searching
  407.           through the stack).
  408.  
  409.           You can remove a command from the stack by displaying it and
  410.           pressing <^PgDn>, and you can clear the entire stack by pressing
  411.           <^PgUp>.
  412.  
  413.           The actual number of commands which will be held in the stack is
  414.           a function of the length of the commands and the size of the
  415.           stack (which can be increased; see below for details).
  416.  
  417.  
  418.  
  419.  
  420.           This is one of those computer gizmos that's easier to use than it
  421.           is to explain.  Just play with <Up> and <Down>; you'll get the
  422.           idea.
  423.  
  424.  
  425.           Application program command stack
  426.           ---------------------------------
  427.  
  428.           CED actually keeps two complete command stacks: one is for DOS
  429.           commands, the other for commands entered into compatible appli-
  430.           cation programs (DEBUG, et al).  Thus, DOS commands will not
  431.           appear in the command stack while in DEBUG, and vice versa.
  432.  
  433.  
  434.           Pcall function
  435.           --------------
  436.  
  437.           "Pcall" stands for parameter recall; this is a second way to
  438.           quickly retrieve old commands.  Pcall simply remembers old
  439.           parameters to specific commands.  For example, suppose you have
  440.           an editor called "edit", and the last time you executed it, you
  441.           used "edit c:\util\foo.doc".  If you now enter "edit" without any
  442.           parameters, CED will assume that you want to edit the same file
  443.           and will supply the "c:\util\foo.doc" for you.
  444.  
  445.           You could, of course, scroll back through the command buffer to
  446.           find the old command, but it might take a while to find it (and
  447.           the command might be missing if it was too long ago).
  448.  
  449.           Because many commands are best used WITHOUT parameter recall
  450.           (FORMAT and ERASE are good examples), CED will only use pcall on
  451.           commands that you specify.   To make a command "pcallable", type
  452.  
  453.                CED PCALL <command>
  454.  
  455.           at the DOS prompt.  For example, if you want to make "edit" a
  456.           pcall command, type
  457.  
  458.                CED PCALL edit
  459.  
  460.           (Remember that the CED diskette need not be available).
  461.  
  462.           If you wish to issue a command for which pcall is enabled, but
  463.           you do not want it to have parameters, add a space after the
  464.           command.  For example, suppose you have issued a "CED PCALL dir"
  465.           command and your last dir was a "dir *.exe". If you now type
  466.           "dir", CED will add the "*.exe" automatically.  However, if you
  467.           type "dir " (note the space), CED will not add the "*.exe", and
  468.           you'll get a full directory. 
  469.  
  470.           You may also bypass pcall processing through the use of the
  471.           ignore character; see below, under "Ignoring Individual
  472.           Commands".
  473.  
  474.  
  475.  
  476.  
  477.  
  478.           Synonyms
  479.           --------
  480.  
  481.           The synonym function allows you to define brief "synonyms" for
  482.           frequently used commands.  For example, suppose you invoke your
  483.           communications package by typing "talk rbbs /c63".  CED allows
  484.           you to abbreviate this to a shorter command, say, "bb", by
  485.           typing at the DOS prompt:
  486.  
  487.                CED SYN bb talk rbbs /c63
  488.  
  489.           The exact syntax is:
  490.  
  491.                CED SYN <synonym> <command>
  492.  
  493.           The <synonym> is the command abbreviation (which you will type at
  494.           the DOS prompt), and <command> is the word or phrase that CED
  495.           will substitute when it sees <synonym>.  The synonym is always
  496.           the first word after the keyword "syn", and <command> is always
  497.           all of the remaining words.
  498.  
  499.           For example, "CED syn d dir" allows you to type "d" instead of
  500.           "dir".  You may add parameters: "d *.exe" becomes equivalent to
  501.           "dir *.exe".
  502.  
  503.           Many people define very short synonyms for frequently used
  504.           commands:
  505.  
  506.                CED SYN d dir
  507.                CED SYN e edit
  508.                CED SYN g debug
  509.                CED SYN l link
  510.                CED SYN rbbs talk rbbs /c63
  511.                CED SYN cc1 cc1 -bpe
  512.  
  513.           Note in the last example that you can use a synonym that is
  514.           identical to its associated phrase and simply use it to automat-
  515.           ically add parameters.
  516.  
  517.           Also note that synonym processing takes place AFTER pcall
  518.           processing; thus if you use a command synonym and wish the
  519.           command to be "pcallable", use the synonym in the pcall command.
  520.           For example:
  521.  
  522.                CED SYN e edit
  523.                CED PCALL e    (not PCALL edit)
  524.  
  525.  
  526.           User program synonyms
  527.           ---------------------
  528.  
  529.           Because CED "knows" whether it is being used from the DOS prompt
  530.           or from an application program such as DEBUG, it is possible to
  531.  
  532.  
  533.  
  534.           define separate sets of synonyms for DOS commands and for user
  535.           programs.  The syntax for a "user synonym" is
  536.  
  537.                CED USERSYN <synonym> <command>
  538.  
  539.           This is identical to the SYN command except for the new keyword
  540.           USERSYN.  For example, if you need to frequently type the DEBUG
  541.           command "d ds:1010 1200", you might use
  542.  
  543.                CED USERSYN d1 d es:1010 1200
  544.  
  545.           (Remember that DEBUG is a CED-compatible program; thus you can
  546.           type CED commands at the DEBUG prompt.)  Then you could simply
  547.           type "d1" to dump memory from the specified address.  Note
  548.           that  a "d1" USERSYN is separate from a "d1" SYN; at the DOS
  549.           prompt you'd get the SYN, in DEBUG or EDLIN you'd get the
  550.           USERSYN.
  551.  
  552.  
  553.           Command chaining
  554.           ----------------
  555.  
  556.           The command chaining feature allows you to place more than one
  557.           command in a SYN or USERSYN.  These commands would be passed to
  558.           DOS or to the user program one at a time, as input is requested. 
  559.           Suppose, for example, that in order to run your communications
  560.           package, you always type:
  561.  
  562.                cd \talk
  563.                talk cis /c63
  564.                cd \
  565.  
  566.           You could put this sequence into one synonym by typing
  567.  
  568.                CED SYN cis cd \talk^talk cis /c63^cd \
  569.  
  570.           The ^ character serves as a command separator.  When you type CIS
  571.           at the prompt, CED will output everything up to the ^ (in this
  572.           case, "cd \talk") and then simulate an <Enter>.  The next time
  573.           DOS requests input, it will get "talk cis /c63<Enter>", and so
  574.           on.
  575.  
  576.           Note that CED will not pass DOS-chained commands to user
  577.           programs; thus, in
  578.  
  579.                CED SYN bug cd \util^debug^cd \
  580.  
  581.           DEBUG would not see the trailing "cd \", which would still be
  582.           held up until you return to the DOS prompt.
  583.  
  584.           The first of the chained commands (e.g., the first 'cd \' above)
  585.           cannot itself be a synonym, but the remaining commands can.  That
  586.           is, if 'f' and 'g' are synonyms, the command
  587.  
  588.  
  589.  
  590.  
  591.                CED SYN h dir^f^g
  592.  
  593.           will work as you expect.  Be careful, though.  A command like
  594.  
  595.                CED SYN f dir^f
  596.  
  597.           will put the computer into a loop from which there is no retreat.
  598.  
  599.           It may be useful in some circumstances, however, to fool CED into
  600.           allowing the first command to be a synonym by simply inserting a
  601.           ^ as the first character of the chain:
  602.  
  603.                CED SYN d dir
  604.                CED SYN f ^d^cd \
  605.  
  606.           When "f" is keyed, CED will first pass a null string to DOS, then
  607.           "dir" and "cd \".  This trick will work OK at the DOS prompt, but
  608.           it may cause problems in some user programs (it would insert a
  609.           blank line, for example, if you were in EDLIN line-insert mode).
  610.  
  611.           Limited "nesting" of chains is allowed.  Consider the following
  612.           definitions:
  613.  
  614.                CED SYN 1 a^b^c
  615.                CED SYN 2 x^1^z
  616.  
  617.           By executing "2", the commands issued will be x, a, b, c,and z. 
  618.           The limitation is that the stored commands ready for chaining
  619.           must not exceed 512 characters total.  In the above example,
  620.           after you have keyed "2" and the "x" is passed to the operating
  621.           system, the stored commands will be:
  622.  
  623.                1^z
  624.  
  625.           which requires 4 characters of storage (3 for the stored
  626.           commands, plus one for a terminating carriage return).  The next
  627.           time CED is called, it will note that "1" is a synonym; the
  628.           first "1" command ("a") is passed to the operating system, and
  629.           the new stored commands will be:
  630.  
  631.                b^c^z
  632.  
  633.           which requires 6 bytes of storage.  At no time can this list of
  634.           stored commands exceed 512 bytes; characters pushed beyond the
  635.           end of this storage will be lost.
  636.  
  637.           For whatever it's worth, you can use chaining directly at the dos
  638.           prompt:
  639.  
  640.                C> dir^cd \
  641.  
  642.           will work as you'd expect.
  643.  
  644.  
  645.  
  646.  
  647.           You may alter the chain character (command separator) via the CED
  648.           command
  649.  
  650.                CED CHAINCH <char>
  651.  
  652.           So, for example, "CED CHAINCH &" would replace ^ with & as the
  653.           command separator.  The chain character can, but probably should
  654.           not, be a control character.  If you are typing the command
  655.           directly into CED, you can just type the control character:
  656.  
  657.                CED CHAINCH <Ctrl-A>
  658.  
  659.           However, if you are setting the chain character via configuration
  660.           files (below), it may not be possible to type in the control
  661.           character directly.  For this reason, you can also specify a
  662.           control character by typing the caret (^) and a letter key. 
  663.           Thus, if you wanted to use ^Y as the chain character, you
  664.           would use '^' and 'Y':
  665.  
  666.                CED CHAINCH ^Y
  667.  
  668.           Certain control characters should not be used as for this
  669.           purpose, because they are used for other functions by DOS; among
  670.           these are ^C (cancel), ^G (bell), ^H (backspace), ^I (tab),
  671.           ^J (linefeed), ^M (carriage return), ^P (printer on), and ^S
  672.           (stop).
  673.  
  674.           The use of control characters as described has more meaningful
  675.           use in setting the "ignore" and "status request" characters
  676.           (below).
  677.  
  678.  
  679.           Command parameters
  680.           ------------------
  681.  
  682.           This section describes how synonyms and command chaining interact
  683.           with command line parameters.
  684.  
  685.           The simplest case is a single word synonym like
  686.  
  687.                CED SYN d dir
  688.  
  689.           which specifies no special parameter handling.  In this case, any
  690.           command line parameters are simply tacked on after the synonym
  691.           substitution: "d *.exe /w" becomes "dir *.exe /w".
  692.  
  693.           If the synonym itself contains parameters:
  694.  
  695.                CED SYN dw dir /w
  696.  
  697.           a similar situation holds.  For example, "dw *.asm" becomes "dir
  698.           /w *.asm".  You might think of these simple nonchained synonyms
  699.           as just substitutions: when CED sees the synonym, it will simply
  700.  
  701.  
  702.  
  703.           substitute the replacement text, leaving the rest of the command
  704.           line alone.
  705.  
  706.           This simple substitution, however, means that your command line
  707.           parameters must always be the last text of the synonym.  There
  708.           would be no way, for example, to define a synonym that would
  709.           obtain a directory of <name>.exe, where <name> is some filename
  710.           entered on the command line and ".exe" is part of the synonym. 
  711.           That is, it would not be possible to define a synonym "d" such
  712.           that the command
  713.  
  714.                d foo
  715.  
  716.           would result in a "dir foo.exe" command.
  717.  
  718.           However, CED does provide a way to substitute parameters into the
  719.           middle of a synonym.  CED recognizes the "%n" dummy parameter
  720.           format used by DOS batch files.  %1 represents the first command
  721.           line parameter, %2 is the second, and so on, up to %9.  Refer to
  722.           your DOS documentation (batch file section) if this is unclear.
  723.  
  724.           Thus, a synonym which would provide the example function is:
  725.  
  726.                CED SYN d dir %1.exe
  727.  
  728.           When "d foo" is executed, "foo" (the first command line
  729.           parameter) is substituted for the %1, resulting in the desired
  730.           command "dir foo.exe".
  731.  
  732.           When a synonym contains chained commands, all parameter
  733.           substitution is performed at one time, before the chain is
  734.           started.  Thus,
  735.  
  736.                CED SYN f a %1^b %2^c %3
  737.  
  738.           when executed "f one two three" will result in three commands:
  739.  
  740.                a one
  741.                b two
  742.                c three
  743.  
  744.           If a chain-command synonym contains no dummy parameters (no %'s)
  745.           the command line parameters will be appended to the end of the
  746.           chain, i.e., as parameters to the last command.  So,
  747.  
  748.                CED SYN f a^b^c
  749.  
  750.           when executed "f foo" will result in the three commands:
  751.  
  752.                a
  753.                b
  754.                c foo
  755.  
  756.  
  757.  
  758.  
  759.           You can change the dummy parameter character from '%' to another
  760.           character using the
  761.  
  762.                CED PARAMCH <char>
  763.  
  764.           command.  The rules described for CHAINCH apply here.
  765.  
  766.  
  767.           Ignoring commands
  768.           -----------------
  769.  
  770.           There may be certain commands that you do not want CED to
  771.           process; for example, you might not want the ERASE command
  772.           stacked.  To instruct CED to ignore a command, use the CED
  773.           command
  774.  
  775.                CED IGNORE <command>
  776.  
  777.           For example:
  778.  
  779.                CED IGNORE erase
  780.  
  781.           When a command is set to IGNORE, CED will not place it in the
  782.           command stack, check for synonyms, or perform any pcall pro-
  783.           cessing (even if you have set PCALL for that command).
  784.  
  785.  
  786.           Ignoring individual commands
  787.           ----------------------------
  788.  
  789.           You may sometimes want CED to ignore processing of a specific
  790.           command.  For example, you may have "dir" defined as a synonym
  791.           for an external program that will display a sorted directory,
  792.           but on occasion want to display a standard DOS directory.  To
  793.           force CED to suspend all processing of a command, precede it with
  794.           ^N (Ctrl-N).  If the first character of input is ^N, CED will
  795.           not stack the command, check for synonyms, or perform any pcall
  796.           processing (just as if it were IGNOREd).  The Ctrl-N, of course,
  797.           is not passed to DOS or to the application program.  For example:
  798.  
  799.                ^Ndir
  800.  
  801.           If you find ^N inconvenient, you can change the ignore character
  802.           to a different character by using the IGNORECH command:
  803.  
  804.                CED IGNORECH ^T
  805.                CED IGNORECH !
  806.  
  807.           See the section on command chaining (above) for more information
  808.           on how to enter control characters in this command.
  809.  
  810.  
  811.  
  812.  
  813.  
  814.           Clearing CED objects
  815.           --------------------
  816.  
  817.           From time to time it may be useful to clear a CED "object": a
  818.           pcall command, a synonym, or an ignore command.  The CLEAR
  819.           command allows you to do this.  The formal syntax is:
  820.  
  821.                CED CLEAR <function> [[FROM] <name>]
  822.  
  823.           This looks more complex than it is.  The <function> is one of
  824.           SYN, USERSYN, PCALL, and IGNORE.  Since the [[FROM] <name>] is
  825.           optional, the simplest form of the clear command is exemplified
  826.           by:
  827.  
  828.                CED CLEAR SYN
  829.  
  830.           which will clear all synonyms.  Similarly,
  831.  
  832.                CED CLEAR PCALL
  833.  
  834.           clears all pcall commands.
  835.  
  836.           You may clear an individual item by including its name.  For
  837.           example:
  838.  
  839.                CED CLEAR USERSYN foo
  840.  
  841.           clears the user synonym "foo", leaving all others synonyms
  842.           undisturbed.
  843.  
  844.           Finally, you can clear all items FROM a specified item through
  845.           the end of the list with the FROM option.  For example:
  846.  
  847.                CED CLEAR USERSYN FROM foo
  848.  
  849.           would clear the user synonym "foo" and all synonyms listed after
  850.           "foo".  This command is particularly useful if you have loaded a
  851.           temporary set of synonyms for some special purpose.  Suppose, for
  852.           example, that you have a set of synonyms already in memory, then
  853.           you load an additional set to be used temporarily.  When you are
  854.           done, the command
  855.  
  856.                CED CLEAR SYN FROM foo
  857.  
  858.           would delete all of the "temporary" synonyms, assuming that the
  859.           first of these was "foo".
  860.  
  861.           Note that SYN and USERSYN objects share storage.  Thus, a
  862.           CLEAR SYN FROM <item> or CLEAR USERSYN FROM <item> will clear all
  863.           synonyms (of either type) FROM the named item.  Similarly, CLEAR
  864.           SYN and CLEAR USERSYN are functionally identical: all synonyms of
  865.           either type will be cleared.
  866.  
  867.  
  868.  
  869.  
  870.  
  871.           Configuration files
  872.           -------------------
  873.  
  874.           Obviously it would be inconvenient to have to type in all of
  875.           these commands every time you use your computer.  However, you
  876.           may put any CED command into a special CED configuration file,
  877.           and have them loaded all at once.
  878.  
  879.           The configuration file is simply an ASCII text file (created by
  880.           your text editor, EDLIN, or word processor in nondocument mode)
  881.           that contains a series of CED commands.  Just leave out the
  882.           keyword "CED", but include the rest of the command:
  883.  
  884.                Rem       Remarks are OK if preceded by "REM"
  885.                Rem
  886.                Rem       Set chain char to '&'
  887.                Chainch &
  888.                Rem       Set ignore char to '!'
  889.                Ignorech !
  890.                Rem       Set a few synonyms
  891.                Syn d dir
  892.                Syn e edit
  893.                Syn cis cd \talk & talk cis & cd \
  894.                Usersyn dd d ds:1017 L40
  895.                Rem       And a few pcall commands
  896.                Pcall e
  897.                Pcall debug
  898.                Rem       Ignore all DEL, ERASE, and FORMAT commands
  899.                Ignore erase
  900.                Ignore format
  901.                Ignore del
  902.  
  903.           To read in your file, use the CED -f command line switch:
  904.  
  905.                CED -F<filename>
  906.  
  907.           For example, if your configuration file is call CED.CFG, you'd
  908.           use
  909.  
  910.                CED -Fc:\boot\ced.cfg
  911.  
  912.           If you load new configuration files during one computer session,
  913.           the PCALL, SYN, USERSYN, and IGNORE commands are added to those
  914.           already stored, without regard to duplication (see "Multiple
  915.           definitions" below).
  916.  
  917.           Note that if you have several commands that you want to enter
  918.           into CED (but don't have them in a file), you can use
  919.  
  920.                CED -Fcon
  921.  
  922.           (which specifies CON: as the configuration file name) and then
  923.           type a series of CED commands from the keyboard.  Type ^Z when
  924.           you are done.
  925.  
  926.  
  927.  
  928.  
  929.  
  930.           Changing default buffer sizes
  931.           -----------------------------
  932.  
  933.           CED maintains six separate internal buffers (regions of memory
  934.           where data is stored).  Each buffer is initially set to a default
  935.           size.  The buffers and their default sizes are:
  936.  
  937.                1. DOS command stack (2048 bytes)
  938.                2. Application program command stack (1024)
  939.                3. Synonym list (2048)
  940.                4. Pcall list (1024)
  941.                5. Ignore command list (1024)
  942.                6. User command list (described below) (1024)
  943.  
  944.           You may make these buffers larger or smaller by including a list
  945.           of buffer sizes the FIRST time you load CED during a session
  946.           (i.e., when you turn on the computer, or after a Ctrl-Alt-Del
  947.           reboot).  Use a -B switch as the FIRST CED command:
  948.  
  949.                CED -Bn1,n2,n3,n4,n5,n6
  950.  
  951.           where n1 is the desired size for buffer 1 (DOS command stack), n2
  952.           is the size for buffer 2 (App program command stack), etc.  You
  953.           need not specify all sizes, but if you skip one or more sizes
  954.           (telling CED to use the default) you must include the separating
  955.           commas.  Examples:
  956.  
  957.                CED -B1000,2000,3000,4000,5000,6000  (Set all sizes)
  958.                CED -B1000,,3000  (Set sizes 1 and 3)
  959.                CED -B,,,,,6000 (Set size 6 only)
  960.  
  961.           You cannot set any individual size less than 128 bytes, and the
  962.           total of all sizes must be not exceed 52K (53248) bytes.
  963.  
  964.           Remember that the -B command must be the FIRST command used the
  965.           FIRST time you run CED during each session.  It is not valid any
  966.           other time.  If you wish to set sizes and read a configuration
  967.           file during autoexec, the syntax would be:
  968.  
  969.                CED -Bn1,n2,n3,n4,n5,n6 -F<filename>
  970.  
  971.           For your general information, here is what is stored in each of
  972.           the buffers, and what happens when they fill:
  973.  
  974.           1. DOS Command stack: all non-ignored commands of 3 or more
  975.           characters entered at the DOS prompt.  The command is stored
  976.           before synonym and pcall processing.  Each stored command
  977.           requires one byte more than the length of the command. When the
  978.           buffer fills, the oldest command is deleted.
  979.  
  980.           2. Application program command stack: same as above, except
  981.  
  982.  
  983.  
  984.           commands entered at participating program prompts are stored
  985.           here.
  986.  
  987.           3. Synonym list: the full list of synonyms (both DOS and user
  988.           synonyms) plus their meanings.  Each entry requires the combined
  989.           length of the synonym and its associated command plus three
  990.           bytes.  When the synonym list fills, no new synonyms will be
  991.           accepted unless a CLEAR is performed first.
  992.  
  993.           4. Pcall command list: the list of all pcall commands plus the
  994.           most recent parameter list for each.  Each entry requires the
  995.           combined length of the command and its current parameters
  996.           (including leading separators) plus two bytes.  If the buffer is
  997.           full when a "CED PCALL" command is entered, the new pcall command
  998.           will not be accepted.  If the buffer is full when a pcallable
  999.           command is entered, its parameters will not be remembered.
  1000.  
  1001.           5. Ignore command list: the list of all IGNORE commands.  Each
  1002.           entry requires the command length plus one byte.  If the buffer
  1003.           is full when a new "CED IGNORE" command is entered, the new
  1004.           command will be rejected.
  1005.  
  1006.           6. User-installed command list: the list of all user-installed
  1007.           commands.  Requires the command length plus six bytes of storage
  1008.           for each.  New commands will be rejected if the buffer is full.
  1009.  
  1010.  
  1011.           Status display
  1012.           --------------
  1013.  
  1014.           You may obtain a partial display of CED status any time CED is
  1015.           active (i.e., at the DOS prompt or in a compatible program
  1016.           awaiting input).  Do this by hitting ^T (Ctrl-T).  CED will first
  1017.           display all SYNonyms and  USERSYNonyms, then a list of all
  1018.           buffer sizes.  For each buffer CED will show the total bytes
  1019.           allocated and the number of bytes free.
  1020.  
  1021.           When the display is complete, CED will redisplay any partial
  1022.           input that you typed before ^T, and you may continue data entry.
  1023.  
  1024.           If ^T is not convenient, you can change the status request
  1025.           character by using the CED command
  1026.  
  1027.                CED STATCH <character>
  1028.  
  1029.           as in "CED STATCH ^A" or "CED STATCH %".  See the section on
  1030.           command chaining for more information on using control characters
  1031.           in this command.
  1032.  
  1033.  
  1034.           Multiple definitions
  1035.           --------------------
  1036.  
  1037.  
  1038.  
  1039.  
  1040.           It is possible to duplicate a definition within one of the CED
  1041.           lists (SYN, USERSYN, PCALL, IGNORE).  For example, you may create
  1042.           more than one synonym for "d".  In the event of multiple
  1043.           definitions, CED will always use the newest.
  1044.  
  1045.           Suppose, for example, that you have "d" defined as a SYN for
  1046.           "dir".  If you subsequently issue the command "CED SYN d debug",
  1047.           you will have two synonyms for "d".  When you enter "d", CED will
  1048.           use the latest definition: "debug".  If you then issue a "CLEAR
  1049.           SYN d", CED will again use the latest definition and clear the
  1050.           "debug" synonym, at which point the "dir" definition again
  1051.           becomes effective.
  1052.  
  1053.           Multiple definitions have no real meaning for PCALL and IGNORE,
  1054.           but they are supported nonetheless.
  1055.  
  1056.  
  1057.           User-installed commands
  1058.           -----------------------
  1059.  
  1060.           This section describes how to add new resident commands to DOS
  1061.           using CED.  It is an advanced topic, and is intended for
  1062.           programmers only; you don't need to read this section to use CED.
  1063.  
  1064.           CED provides a means to enqueue new DOS commands, that is, to add
  1065.           internal commands to DOS.  Once enqueued, CED will call a routine
  1066.           that you specify whenever the user types the new command (at
  1067.           the DOS prompt, or in a "participating" program).
  1068.  
  1069.           Access to CED service is provided via a bogus DOS function,
  1070.           0FFH.  This function behaves as a normal DOS function; that is,
  1071.           you must set up the registers as needed by the call, place a 0FFH
  1072.           in register AH, and execute an INT 21H.  The two subfunctions are
  1073.           described below; the subfunction code is placed in register
  1074.           AL.
  1075.  
  1076.  
  1077.           SUBFUNCTION 0: ENQUEUE
  1078.  
  1079.           This subfunction allows you to enqueue a new command.  Input
  1080.           register use is as follows:
  1081.  
  1082.                AH = 0FFH (CED service)
  1083.  
  1084.                AL = 0 (ENQUEUE)
  1085.  
  1086.                BL = MODE
  1087.                     This is a bit flag that tells CED when to call your
  1088.                     routine.  You have the option of being called if your
  1089.                     command is typed at the DOS prompt, at a user program
  1090.                     prompt, or both.  Bit 0, if set, specifies that you are
  1091.                     to be called at the DOS prompt; Bit 1, if set,
  1092.                     specifies that you are to be called at a user program
  1093.                     prompt.
  1094.  
  1095.  
  1096.  
  1097.  
  1098.                DS:SI = command name
  1099.                     This is a dword pointer to your command (i.e., you are
  1100.                     to be called when the user types this string).  The
  1101.                     command must be from one to eight characters,
  1102.                     terminated by a carriage return.  CED is not case
  1103.                     sensitive.
  1104.  
  1105.                ES:DI = command processor entry point
  1106.                     This is a dword pointer to the routine that is to be
  1107.                     executed when the new command is entered.
  1108.  
  1109.  
  1110.           SUBFUNCTION 1: DEQUEUE
  1111.  
  1112.           This subfunction allows you to dequeue a user command; after a
  1113.           command has been dequeued, CED will no longer call you if the
  1114.           user types your command.  Input register use is:
  1115.  
  1116.                AH = 0FFH (CED service)
  1117.  
  1118.                AL = 1 (DEQUEUE)
  1119.  
  1120.                DS:SI = command name
  1121.                     A dword pointer to the name of the command to be
  1122.                     dequeued (i.e., the same DS:SI as was used to enqueue
  1123.                     the command).
  1124.  
  1125.  
  1126.           RETURN REGISTERS
  1127.  
  1128.           On return from CED service (DOS function 0FFH), all registers are
  1129.           preserved except AX.  The carry flag, if set, indicates that an
  1130.           error occurred; AX has the error code, which will be one of:
  1131.  
  1132.                1:   Invalid function.  At present, only subfunctions 0
  1133.                     and 1 are supported.  Subfunction 2 is reserved.
  1134.  
  1135.                2:   Command not found (DEQUEUE only).
  1136.  
  1137.                8:   Insufficient memory (ENQUEUE only).
  1138.  
  1139.                13:  Invalid data. (ENQUEUE only; bad MODE flag, or invalid
  1140.                     command length).
  1141.  
  1142.           NOTE: In current versions of DOS, AH returns 0FFH if function
  1143.           0FFH is requested and CED is not installed.  You may use the
  1144.           reserved subfunction (2), at your own risk, to test for CED
  1145.           installation.  If AH returns any value other than 0FFH, CED is
  1146.           probably installed.
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.           COMMAND PROCESSOR
  1153.  
  1154.           Your command processor is entered via a far call from CED.  Entry
  1155.           registers are as follows:
  1156.  
  1157.                BL = MODE
  1158.                     This is the same bit flag as is used in the ENQUEUE
  1159.                     subfunction.  You may use it to test "where you are".
  1160.  
  1161.                CL = MAXLEN
  1162.                     This is the maximum allowed length of the user input
  1163.                     string (i.e., the value of byte 0 of the DOS function
  1164.                     0AH input buffer) less one.
  1165.  
  1166.                DS:DX = Command tail pointer
  1167.                     This is a dword pointer to the command tail of the
  1168.                     user's input.  For example, if your command is "hello"
  1169.                     and the user types "hello sam", DS:DX will point to the
  1170.                     space after "hello".
  1171.  
  1172.                DS:DI = Command pointer
  1173.                     This is a dword pointer to the first byte of the actual
  1174.                     user input.
  1175.  
  1176.           Note that DS:DI and DS:DX point to buffer space within CED, not
  1177.           to the actual DOS function 0AH input buffer.  There are no
  1178.           length attribute bytes preceding the buffer; DS:SI points to the
  1179.           first byte of the buffer, not the third.  CED will copy the final
  1180.           buffer, after all processing, to the actual input buffer.
  1181.  
  1182.           You may manipulate the buffer to your heart's content.  It is 255
  1183.           characters long, but CED will truncate the string if necessary
  1184.           (if the final command is longer than the maximum allowed by the
  1185.           function 0AH request).  In particular, note two things about the
  1186.           CED buffer:
  1187.  
  1188.                1.   The string MUST be terminated by a carriage return
  1189.                     ASCII 13).
  1190.  
  1191.                2.   If you null out the buffer (by putting a carriage
  1192.                     return in relative byte 0) CED will return a null
  1193.                     string to DOS or the user program.  This is probably
  1194.                     what you will want to do.
  1195.  
  1196.           There are few restrictions on what you can do within your service
  1197.           routine.  You may request other DOS service (EXCEPTION: do not
  1198.           request more buffered input via function 0AH!!), and you need not
  1199.           preserve any registers except SS:SP.  The stack in effect on
  1200.           entry will have about 200 bytes free; switch to a larger internal
  1201.           stack if necessary.
  1202.  
  1203.           Return to CED via a far RET.
  1204.  
  1205.  
  1206.  
  1207.  
  1208.           Appendix E contains a sample assembler program to enqueue a
  1209.           trivial command.
  1210.  
  1211.  
  1212.           Problem determination
  1213.           ---------------------
  1214.  
  1215.           If you find any problems with CED, please report them to me,
  1216.           preferably at CompuServe ID 76703,2002.  Before reporting
  1217.           problems, however, PLEASE take the following steps:
  1218.  
  1219.                1. REREAD THE DOCUMENTATION!  The majority of "problems"
  1220.                that have been reported to date could have been solved by a
  1221.                careful review of this Guide.
  1222.  
  1223.                2. Install CED in a "clean" environment, i.e., without any
  1224.                other resident utilities.  Temporarily rename your
  1225.                AUTOEXEC.BAT and CONFIG.SYS files to other names; reboot,
  1226.                reinstall CED, and test.  If it works correctly, there is a
  1227.                conflict with some other program.  Try to isolate the
  1228.                conflict by reinstalling your other programs one by one. You
  1229.                may even be able to resolve the conflict by varying the load
  1230.                order.  If you locate the conflict, let me know about it.  I
  1231.                cannot guarantee that it will be resolved, but I will make
  1232.                an attempt when time permits.
  1233.  
  1234.                It will not be necessary to rename CONFIG.SYS if it only
  1235.                contains FILES, BUFFERS, COUNTRY, FCBS, and ANSI.SYS
  1236.                statements.
  1237.  
  1238.           If the problem persists, please report the problem as accurately
  1239.           and completely as possible.  Include the CED version number
  1240.           (obtained by the command CED VER), and a listing of your
  1241.           CONFIG.SYS and AUTOEXEC.BAT files if you think that might have
  1242.           some bearing (they usually do).
  1243.  
  1244.           There are three common "problems" that can be easily resolved. 
  1245.           These are:
  1246.  
  1247.                PROBLEM: When you execute a synonym that contains multiple
  1248.                commands, you find that you have to press <Enter> or another
  1249.                key after the first command in order to execute the rest of
  1250.                the chain.
  1251.  
  1252.                CAUSE: You are probably using an old version of Borland
  1253.                International's Sidekick (TM), or some similar resident
  1254.                program; older versions required that a physical keystroke
  1255.                be present in the keyboard buffer before they would actually
  1256.                request any input. 
  1257.  
  1258.                SOLUTION: upgrade to a current Sidekick version.  Alternate
  1259.                solution: reverse the order in which you are loading
  1260.                Sidekick and CED.
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.                PROBLEM: You are surprised to find that you can't enter data
  1267.                beginning with the word "CED" into a program (EDLIN, for
  1268.                example).
  1269.  
  1270.                CAUSE: CED is "active", as defined above.  Thus, as
  1271.                documented, CED is watching for commands--which begin with
  1272.                the keyword CED.  Thus, your input is being interpreted as a
  1273.                CED command, not as data to your program.
  1274.  
  1275.                SOLUTION: precede the data you are entering by the ignore
  1276.                character.
  1277.  
  1278.  
  1279.                PROBLEM: CED doesn't work when you load it with the public
  1280.                domain filepathing utility SEARCH.
  1281.  
  1282.                CAUSE: This, and the Sidekick problem mentioned above, are
  1283.                the only known interactions between CED and other software. 
  1284.                (There is a conflict between SEARCH and CED's external
  1285.                interface.)
  1286.  
  1287.                SOLUTION: reverse the order in which you are loading SEARCH
  1288.                and CED.  Both programs should then function normally,
  1289.                except the CED's external interface will NOT be available. 
  1290.                This will affect you only if you are using externally
  1291.                loaded CED commands.
  1292.  
  1293.  
  1294.           Availability of commercial version
  1295.           ----------------------------------
  1296.  
  1297.           This will probably be the final public domain version of CED. 
  1298.           I have been encouraged by many people to make available as a
  1299.           retail product an enhanced version of CED, and (somewhat against
  1300.           my better judgement) I have determined to do so.  This was not my
  1301.           intent when the project was begun, but the amount of time spent
  1302.           responding to mail and phone calls about the program is out of
  1303.           all proportion to what I can afford.
  1304.  
  1305.           The commercial version will contain these enhancements and new
  1306.           features, and more:
  1307.  
  1308.                -- Function key compatibility with DOS (for EDLIN).
  1309.  
  1310.                -- PACK command deletes all duplicate definitions.
  1311.  
  1312.                -- SAVE command saves complete current context to disk.
  1313.  
  1314.                -- STATUS command allows display of CED status from within a
  1315.                synonym.
  1316.  
  1317.                -- Access to environmental variables (PATH, COMSPEC, PROMPT,
  1318.                etc., plus any SET variables).
  1319.  
  1320.  
  1321.  
  1322.  
  1323.                -- Special variables to allow use of current path, date,
  1324.                etc., in synonyms.
  1325.  
  1326.                -- "Minimum truncations" to allow the synonym processor to
  1327.                match any of a variety of abbreviations of a command.
  1328.  
  1329.                -- Error message suppression on request.
  1330.  
  1331.                -- Improved handling of Ctrl-Break.
  1332.  
  1333.                -- Facility to edit existing synonym definitions.
  1334.  
  1335.                -- Online command summary.
  1336.  
  1337.                -- Chained commands will not be stacked, making recall of
  1338.                last typed command easier.
  1339.  
  1340.                -- More powerful CLEAR command.
  1341.  
  1342.                -- DOS command logging to disk.
  1343.  
  1344.                -- Improved screen control.
  1345.  
  1346.                -- Ability to suppress CED processing temporarily, and to
  1347.                remove CED from memory entirely.
  1348.  
  1349.                -- Ability to distinguish between different invocations of
  1350.                the DOS shell (so that chained synonyms from one COMMAND.COM
  1351.                do not get executed by secondary invocations of the command
  1352.                shell.)
  1353.  
  1354.                -- Facility to allow use of CED synonyms in batch files.
  1355.  
  1356.                -- Greatly improved external interface.  Among other
  1357.                features, programs you write can access CED synonyms.
  1358.  
  1359.           The commercial version of CED (called PCED) will be available on
  1360.           January 1, 1986, from:
  1361.  
  1362.                     The Cove Software Group
  1363.                     P.O. Box 1072
  1364.                     Columbia, Maryland 21044
  1365.                     (301) 992-9371
  1366.  
  1367.           The introductory price (through March 1, 1986) will be $35.00
  1368.           plus $2.50 shipping and handling (Maryland residents add sales
  1369.           tax).  Call Cove Software at the above number for volume pricing
  1370.           and site license arrangements, and for pricing after March 1,
  1371.           1986.
  1372.  
  1373.           Special keyboard and video drivers are available for some 
  1374.           non-IBM-compatible MS-DOS machines.  Call for availability.
  1375.  
  1376.  
  1377.  
  1378.  
  1379.                              Appendix A: Command summary
  1380.                              ---------------------------
  1381.  
  1382.           The following is a complete summary of all CED commands.  These
  1383.           commands may be included in a CED configuration file (with the
  1384.           exception of -F and -B), or they may be typed in directly by
  1385.           prefixing them with "CED ".
  1386.  
  1387.           -Bn1,n2,n3,n4,n5,n6      Sets the sizes of the six internal
  1388.                                    buffers.  Valid ONLY as FIRST command
  1389.                                    when installing CED after boot or
  1390.                                    reboot.
  1391.  
  1392.           -F<Filename>             Loads a CED configuration file.  Not a
  1393.                                    valid command within a config file.
  1394.  
  1395.           SYN <synonym> <command>  Defines a synonym.  The first word is
  1396.                                    the synonym, all remaining words are
  1397.                                    substituted for the synonym.
  1398.  
  1399.           USERSYN <synonym> <command>  Defines a user synonym.  Identical
  1400.                                    to SYN, except that the synonym is
  1401.                                    available within user programs rather
  1402.                                    than at the DOS prompt.
  1403.  
  1404.           PCALL <command>          Defines a command subject to pcall
  1405.                                    processing.
  1406.  
  1407.           IGNORE <command>         Defines a command to be ignored--CED
  1408.                                    will not perform any processing on this
  1409.                                    command at all.
  1410.  
  1411.           CHAINCH <char>           Defines the command chaining character,
  1412.                                    which is the character used to separate
  1413.                                    commands in a multi-command synonym. 
  1414.                                    Normally '^'.
  1415.  
  1416.           IGNORECH <char>          Defines the keyboard-ignore character;
  1417.                                    when this character is typed as the
  1418.                                    first character of keyboard input, CED
  1419.                                    will perform no further processing on
  1420.                                    it.  Normally ^N.
  1421.  
  1422.           STATCH <char>            Defines the status request character. 
  1423.                                    When you type this character while CED
  1424.                                    is active, CED will display its status. 
  1425.                                    Normally ^T.
  1426.  
  1427.           PARAMCH <char>           Defines the dummy parameter character. 
  1428.                                    Normally '%'.
  1429.  
  1430.           CLEAR <function> [[FROM] <name>]   Clears all or part of a
  1431.                                    list of CED objects.  <function> is one
  1432.                                    of SYN, USERSYN, PCALL, or IGNORE. 
  1433.  
  1434.  
  1435.  
  1436.                                    Without arguments, clears all of the
  1437.                                    specified list.  With a <name>, clears
  1438.                                    that item only.  With a FROM <name>,
  1439.                                    clears that item and all subsequent
  1440.                                    items. 
  1441.  
  1442.           VER                      Display CED version number and copyright
  1443.                                    notice.
  1444.  
  1445.  
  1446.           Commands may be abbreviated as follows:
  1447.  
  1448.                USERSYN        USYN
  1449.                PCALL          PC       
  1450.                IGNORE         IG
  1451.                CHAINCH        CC
  1452.                IGNORECH       IC   
  1453.                STATCH         SC
  1454.                PARAMCH        PM   (NOT PC!)
  1455.                CLEAR          CL
  1456.  
  1457.           Note, however, that the arguments to CLEAR may NOT be
  1458.           abbreviated; CLEAR USYN or CLEAR IG are not valid.
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.                            Appendix B: Order of Processing
  1465.                            -------------------------------
  1466.  
  1467.           CED performs its basic processing in the following order:
  1468.  
  1469.           1. Obtain input.  If there is a chained command pending, obtain
  1470.           input from the chain; otherwise from keyboard.
  1471.  
  1472.           2. Check for "ignore".  If command is an "ignore" command or if
  1473.           the first character of input is the ignore character, skip all
  1474.           further processing.
  1475.  
  1476.           3. Stack the command (if longer than two characters) in the
  1477.           appropriate command stack.
  1478.  
  1479.           4. Perform pcall (parameter recall) processing and store the
  1480.           result for pcall processing next time the same command is
  1481.           entered.
  1482.  
  1483.           5. Perform synonym processing and parameter substitution.
  1484.  
  1485.           6. Check for CED command.  If input is a CED command, process and
  1486.           clear the input (returning null string to caller).  Skip rest.
  1487.  
  1488.           7. Check for command chaining.  If the chain character appears in
  1489.           the input, store all commands after the first chain character for
  1490.           later processing, and pass back the first command only.
  1491.  
  1492.           8. Examine the resulting command and see if it's a user-installed
  1493.           command.  If so, call user command processor.
  1494.  
  1495.  
  1496.  
  1497.                                Appendix C: Limitations
  1498.                                -----------------------
  1499.  
  1500.           There is a limit of 255 characters on any input line from a CED
  1501.           configuration file.  DOS will limit you to 127 characters at the
  1502.           DOS prompt.
  1503.  
  1504.           For PCALL, SYN, USERSYN, and IGNORE to be effective, their
  1505.           commands must begin in the first column of input and must be
  1506.           separated from any parameters by one of the following characters:
  1507.  
  1508.                ; , < > | = + [ ] / <Tab> <Space>
  1509.  
  1510.           Thus, if you have "cd" defined for pcall processing, "cd\" will
  1511.           not work correctly.  However, "cd \" will be OK.  Similarly, if
  1512.           you have a synonym "d" for "debug", the command "c:\util\d" will
  1513.           not work, nor will " d" (note leading space).
  1514.  
  1515.           Remember that CED is active only at the DOS prompt or when a user
  1516.           program requests input via DOS function 0AH.  This has several
  1517.           effects:
  1518.  
  1519.                Programs that allow you to execute DOS commands or other
  1520.                programs as subtasks generally do not use DOS function 0AH
  1521.                to input the name of the subtask or command; thus, CED is
  1522.                not active, and synonyms are usually not effective.
  1523.  
  1524.                CED cannot operate on statements in batch files.  Thus,
  1525.                synonyms and user-installed commands will not be recognized
  1526.                if they are batch statements, and CED commands will cause
  1527.                CED to be reloaded (which is probably not what you want).
  1528.  
  1529.  
  1530.  
  1531.  
  1532.                                 Appendix D: Versions
  1533.                                 --------------------
  1534.  
  1535.           1.0       Original version.
  1536.           05/13/85
  1537.  
  1538.           1.0A/B    PARAMCH added.  Fixed problem that caused unpre-
  1539.           06/01/85  dictable results if DOS function 0AH called with
  1540.                     8088 direction flag set.  Status display cleaned up. 
  1541.                     Processing order altered to allow synonyms for CED SYN
  1542.                     to process correctly.  Early ROM BIOS bug relating to
  1543.                     cursor size trapped. Config file processing speeded
  1544.                     up. Problems parsing -B command fixed.  Nesting
  1545.                     chaining allowed, as well as direct entry of chained
  1546.                     commands at the DOS/program prompt.  Some minor
  1547.                     incompatibilities with other resident programs elim-
  1548.                     inated.
  1549.  
  1550.           1.0C      Problem with immediate parameters to SYNs (e.g., "d/w",
  1551.           06/03/85  where "d" is a SYN) corrected.  Problem with pcall list
  1552.                     overflow corrected.  Fixed error with ^Z processing
  1553.                     during configuration file read.
  1554.  
  1555.           1.0D      Added <^Home>, <^Bksp>, and <F3> (incorrectly
  1556.           12/07/85  documented as being included in version 1.0C). 
  1557.                     Corrected a few minor (and unreported!) bugs.
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.                             Appendix E: User Command Demo
  1564.                             -----------------------------
  1565.  
  1566.           Comment *
  1567.  
  1568.                userdemo.com - demo of CED user command enqueuing
  1569.  
  1570.                Assembly: (M)ASM userdemo;
  1571.                          LINK userdemo;   (ignore NO STACK message)
  1572.                          EXE2BIN userdemo userdemo.com
  1573.  
  1574.                Use:      Just type 'userdemo'.  You now have
  1575.                          a new DOS command, "hello"
  1576.  
  1577.                Author:   CJDunford
  1578.                          05/28/85
  1579.  
  1580.           *
  1581.  
  1582.           CED       equ 0FFH            ; Special "DOS" fn for CED service
  1583.  
  1584.           ENQUEUE   equ 0               ; Subfunction: enqueue
  1585.           DEQUEUE   equ 1               ; Subfunction: dequeue
  1586.  
  1587.           DOS       equ 1               ; Cmd to be active at DOS prompt
  1588.           USER      equ 2               ; Cmd to be active at user prompt
  1589.  
  1590.           CR        equ 13
  1591.           LF        equ 10
  1592.  
  1593.           code segment
  1594.           assume cs:code,ds:code
  1595.           org 100H
  1596.           main proc far
  1597.                jmp short Install        ; Go to installation
  1598.  
  1599.           ; -----------------------------------------------------
  1600.           ; This is the command processor.  It will be called
  1601.           ; whenever the user types "hello" at the DOS prompt.
  1602.           ; The routine simply prints the string "Hi there, ace".
  1603.           ;
  1604.           ; On entry:
  1605.           ;    BL: mode flag
  1606.           ;       1 = at DOS prompt
  1607.           ;       2 = at user program prompt
  1608.           ;    CL: max length of input
  1609.           ;    DS:SI => user command
  1610.           ;    DS:DX => user command tail
  1611.           ;
  1612.           ; Remember to null out the user string so that
  1613.           ; it is not passed on to DOS, then exit via a far
  1614.           ; return to CED.  Not necessary to preserve any
  1615.           ; registers.
  1616.           ; ------------------------------------------------------
  1617.  
  1618.  
  1619.  
  1620.           Hello proc far                ; Must be a far procedure
  1621.                mov byte ptr [si],CR     ; Null out the user's input
  1622.  
  1623.                mov ax,cs                ; Set up local addressing
  1624.                mov ds,ax
  1625.  
  1626.                mov dx,offset HiThere$   ; Display our message
  1627.                mov ah,9
  1628.                int 21H
  1629.  
  1630.                ret                      ; No need to restore any regs
  1631.           Hello endp
  1632.  
  1633.           HiThere$ db 'Hi there, ace',CR,LF,'$'   ; Message to be displayed
  1634.  
  1635.  
  1636.           ; -----------------------------------------------
  1637.           ; This is the installation routine.  It sets up
  1638.           ; the regs for a call to the CED command enqueuing
  1639.           ; service, enqueues the command, and terminates,
  1640.           ; leaving the command service routine resident
  1641.           ; ------------------------------------------------
  1642.           Install:
  1643.                mov ah,CED               ; CED service request
  1644.                mov al,ENQUEUE           ; Enqueue a new command
  1645.                mov bl,DOS               ; To be active at DOS prompt
  1646.                mov si,offset Hello$     ; DS:SI => command ("Hello")
  1647.                mov di,offset Hello      ; ES:DI => service routine
  1648.                int 21H                  ; Enqueue new command
  1649.                jnc OK                   ; No carry, no error
  1650.  
  1651.                mov dx,offset Error$     ; Only 1 error possible here
  1652.                mov ah,9                 ; Print string
  1653.                int 21H
  1654.                int 20H                  ; Return to DOS
  1655.  
  1656.           OK:
  1657.                mov dx,offset Install    ; OK: terminate/resident
  1658.                int 27H
  1659.           main endp
  1660.  
  1661.           Hello$    db 'hello',CR        ; New command
  1662.           Error$    db 'CED user command list full',CR,LF,'$'
  1663.  
  1664.           code ends
  1665.           end main
  1666.  
  1667.  
  1668.  
  1669.                               Copyright and Disclaimer
  1670.                               ------------------------
  1671.  
  1672.           THIS VERSION of CED is hereby placed in the public domain.  Both
  1673.           CED and this documentation are, however, copyrighted by the
  1674.           author.  CED IS INTENDED FOR YOUR PRIVATE, NONCOMMERCIAL USE
  1675.           ONLY.  You may make copies of the CED program and documentation
  1676.           files for your own use, and you may copy the files for others. 
  1677.           You may not, however, charge for such copies, or in any other way
  1678.           sell the program or otherwise attempt to make money from it or
  1679.           any modified version of it.  Please.
  1680.  
  1681.           An exception to the above is, however, granted to RECOGNIZED
  1682.           USER'S GROUPS, which are hereby authorized to charge a small
  1683.           amount (not to exceed $6.00) for media, postage, handling,
  1684.           and whatnot.
  1685.  
  1686.           I do not warrant that the documentation is accurate, or that the
  1687.           program operates as designed.  I will not be liable for any
  1688.           damages of any kind sustained through the use of the program.  By
  1689.           using the program, you agree to this.
  1690.  
  1691.           Your comments, suggestions, and friendly criticisms are welcome. 
  1692.           The best way to contact me is via CompuServe, either through
  1693.           Easyplex or (better) at the IBM Novice Forum (PCS-129, SGIBMN). 
  1694.           West Coast people, please don't call me at ridiculous hours.
  1695.  
  1696.           IBM is a registered trademark of International Business Machines
  1697.           Corporation. 
  1698.  
  1699.           Sidekick is a trademark of Borland International, Inc.
  1700.  
  1701.           MS-DOS is a trademark of Microsoft Corporation.
  1702.  
  1703.                            Both CED and this document are:
  1704.  
  1705.                                 Copyright (c) 1985 by
  1706.                                Christopher J. Dunford   
  1707.                               10057-2 Windstream Drive
  1708.                               Columbia, Maryland 21044
  1709.                               CompuServe ID 76703,2002
  1710.